﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Messhall.Framework.Repository.UnitOfWork;
using Messhall.Repository.Permission.EntityTypeConfigurations;
using Microsoft.EntityFrameworkCore;

namespace Messhall.Repository.Permission
{
    public class PermissionOnModelCreating : IOnModelCreating
    {
        public void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfiguration(new AccountEntityConfiguration());
            modelBuilder.ApplyConfiguration(new PermissionEntityConfiguration());
            modelBuilder.ApplyConfiguration(new RoleEntityConfiguration());
            modelBuilder.ApplyConfiguration(new RolePermissionEntityConfiguration());
            modelBuilder.ApplyConfiguration(new UsersEntityConfiguration());
            modelBuilder.ApplyConfiguration(new UsersRoleEntityConfiguration());
            modelBuilder.ApplyConfiguration(new PermissionCodeEntityConfiguration());
        }
    }
}
